Import/Export Steps

A REST web service is available to import and export steps.

Import Steps

MockServer

Steps can be imported into the VoiceCheck server using MockServer. To perform this action, copy the file from the examples directory (Steps.json) to Mock server\REST\Default\ImportSteps folder.

CURL

Following command can be used to import steps into the VoiceCheck server.

curl -v -X POST http://serverip:port/VoiceCheck/services/steps/import/{voiceFormName} -F "steps=@pathToJSONfile/abc.json" --user "admin:Talkman1" -H "Content-Type: application\octet-stream"

For example:

curl -v -X POST http://172.31.42.241:9080/VoiceCheck/services/steps/import/test%20form -F "steps=@curl new.json" --user "admin:Talkman1" -H "Content-Type: application\octet-stream"

Postman

  1. Select the method type as POST
  2. URL http://serverip:port/VoiceCheck/service/steps/import/{VoiceFormName}
    Voice Form Name in the above URL is voice form to which steps need to imported
  3. Select the Authorization tab, and select type as “Basic Auth”.
  4. Provide valid username and password
  5. Select the Headers tab, after Authorization header will be automatically filled.
  6. Add header with key as “Content-Type” and values as “application/octet-stream”
  7. Select the Body tab, select form-data checkbox and add key “steps” and in the dropdown next to it select “File” and browse steps.json and click “Send”

Export Steps

MockServer

Existing steps can be exported from the VoiceCheck server using this feature. To do so, copy the file from the examples directory (ReadSteps.json) to Mock server\REST\Default\ReadSteps. The exported file should get stored in Mock server\REST\ReadStepsResponse folder as a timestamped file (steps_timestamp.json).

CURL

Following command can be used to export steps from the VoiceCheck server

http://serverip:port/VoiceCheck/services/steps?stepIds={CommaSeparatedStepIds}